<template>
  <footer >
    <div class="w clearfix">
      <p class="title">
        <span> © Copyright  蓝湾物流 </span>
        <span>服务条款 </span>
        <span>法律声明 </span>
        <span>关于我们 </span>
      </p>
      <p class="title"> <a href="http://www.miitbeian.gov.cn/" style="text-align: center;color:#2c3e50;"> 粤ICP备18059874号</a> </p>
    </div>
  </footer>
</template>
<style scoped>
  /*基础 中文样式*/
  .title{text-align: center}
  .title span{margin-right: 20px;line-height: 50px;cursor: pointer}
  @media only screen and (min-width: 1200px){

  }
  @media only screen and (min-width: 1400px){

  }
  @media only screen and (min-width: 1600px){

  }
  @media only screen and (min-width: 1920px){

  }

  </style>
<script>
  import { mapState, mapActions } from 'vuex'
  import Public from '../../vuex/public.js'

  export default {
    name: 'my-header',
    created () {
     // 查看本页面路由 绑定对应页面class
      this.check = this.$route.name;

    },
    data () {
      return {
        activeIndex: '1',
        activeIndex2: '1',
      }
    },
    methods: {
      ...mapActions({
        lognOutPost: 'loginOutFn'
      }),
      handleSelect(key, keyPath) {
      },

      goPage (name) {
          this.$router.push({name: name})

      },
      //  语言切换
      languageCheng (parm) {
        this.show = !this.show
        if (parm) {
          Public.publicLo.sessionStorageSav('Language',parm)
          this.$store.commit('updateLanguage', parm)
        }
      },
      //
      goAdmin(){
          var test = window.location.href
          this.$router.push({ name: 'adminDavise' })
          //window.open('/adminDavise','_self')
      },
      // 退出
      loginOut (id) {
        var parm = ''
        this.lognOutPost(parm)
      },
      openSuccess (text) {
        this.$message({
          message: text,
          type: 'success'
        })
      },
      openError (text) {
        this.$message.error(text)
      }
    },
    computed: {
      languageData: function () {
        var parm = this.language;
        if (parm) {
            if (parm.check == 'Chinese') {
              parm = parm.Chinese;
            }
            if(parm.check == 'English') {
              parm = parm.English;
            }
        }
        return parm
      },
     updateStatusData: function () {
       var parm = this.updateStatus;
       if (parm == 'out') {
         // 没记住密码保存空 localStorage
         Public.publicLo.sessionStorageSav('token', '');
         Public.publicLo.sessionStorageSav('user', '');
         // 清空所有数据
         this.$store.commit('loginOut', null);
         this.$router.push({ name: 'login' });
         // this.lognOutPost(this.user)
       }
       if (parm == 'outErorr') {
         Public.publicLo.sessionStorageSav('token', '');
         Public.publicLo.sessionStorageSav('user', '');
         // 清空所有数据
         this.$store.commit('loginOut', null);
         this.$router.push({ name: 'login' })
       }
       return 1
     },
      ...mapState([
        'nav',
        'language',
        'updateStatus'
      ])
    },
    mounted () {

    }
  }
</script>

